var assert = require('assert');
// it('判断数据是否相等', function () {
// assert(1==2)
// });
/************************************************************************* */
class ProductionPlan{
  get production(){
      return this._production;
  }
  applyAdjustment(anAdjustment){
      this._adjustments.push(anAdjustment);
      this._production += anAdjustment.amount;
  }
}
/************************************************************************* */
class ProductionPlan {
  get production() {
    assert(this._production === this.calculatedProduction);
    return this._production;
  }
  applyAdjustment(anAdjustment) {
    this._adjustments.push(anAdjustment);
    this._production += anAdjustment.amount;
  }

  get calculatedProduction() {
    return this._adjustments.reduce((sum, a) => sum + a.amount, 0);
  }
}
/************************************************************************* */
class ProductionPlan {
  get production() {
    return this._adjustments.reduce((sum, a) => sum + a.amount, 0);
  }
  applyAdjustment(anAdjustment) {
    this._adjustments.push(anAdjustment);
  }
}